package com.xja.webchat.mapper;

import com.xja.webchat.entity.Chatuser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ChatuserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Chatuser record);

    int insertSelective(Chatuser record);

    Chatuser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Chatuser record);

    int updateByPrimaryKey(Chatuser record);

    //根据用户名查询用户（登录）
    Chatuser selectChatuserByuserid(String userid);
    //发送给登录用户的用户和未读个数
    List<Chatuser> selectUserAndWdgs(Integer id);//登录用户id
    //查找好友
    List<Chatuser> chazhaohaoyou(@Param("keyword") String keyword);
}